package com.ruibang.glass.common.domain.produce;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruibang.glass.common.utils.validateannotation.NotBlank;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-03-11  14:41
 * @Description: TODO:生产-原材料领料实体
 * @Version: 1.0
 */
@Data
@ApiModel
public class RawMaterialReceive extends BaseEntity {

    @ApiModelProperty(value = "主键id")
    private String materialReceiveId;

    @ApiModelProperty("申请单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("配料系统")
    @NotBlank(message = "配料系统不可为空")
    private String system;

    @ApiModelProperty("出库类型")
    @TableField("outbound_type")
    private String outboundType;

    @ApiModelProperty("物品类型")
    @NotBlank(message = "物品类型不可为空")
    @TableField("item_type")
    private String itemType;

    @ApiModelProperty("仓库名称")
    @NotBlank(message = "仓库名称不可为空")
    private String warehouseName;

    @ApiModelProperty("计划领料人名称")
    @TableField("plan_picker")
    private String planPicker;

    @ApiModelProperty("计划领料人用户ID")
    @NotBlank(message = "计划领料人不可为空")
    private String planPickerId;

    @ApiModelProperty("计划时间")
    @NotNull(message = "计划时间不可为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime planTime;

    @ApiModelProperty("创建人用户名称")
    private String createBy;

    @ApiModelProperty("创建人用户ID")
    @NotNull(message = "创建人不可为空")
    private String createById;

    @ApiModelProperty(value = "当前审核人")
    @TableField(exist = false)
    private String currentAuditBy;

}
